import java.util.Locale;
import java.util.Scanner;

/**
 * @Description
 */

public class Main {
    public static String func(String s1,String s2){
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < s1.length(); i++) {
            char ch = s1.charAt(i);
            if(s2.indexOf(ch)!=-1){
                continue;
            }else{
                sb.append(ch);
            }
        }
        return sb.toString();
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextLine()){
            String s1 = scanner.nextLine();
            String s2 = scanner.nextLine();
            String ret = func(s1,s2);
            System.out.println(ret);
        }

    }
    public static void main2(String[] args) {;
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextLine()){
            String a = scanner.nextLine();
            System.out.println(a.toLowerCase());
        }
    }
    public static int fib(int n){
        if(n==1|n==2){
            return 1;
        }
        int f1 = 1;
        int f2 = 1;
        int f3 = 0;
        for (int i = 03; i <=n; i++) {
            f3 = f1+f2;
            f1 = f2;
            f2 = f3;
            
        }
        return f3;
        
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()){
            int a = scanner.nextInt();
            int ret = fib(a);
            System.out.println(ret);
        }
    }
}
